﻿@************************************************************************************//
// Autor:  				                						     				*//
//***********************************************************************************//
// Edit()	Acceso solo ADMINISTRADOR												*//
// Vista que devuelve la plantilla para Editar un Mantenimiento.					*//
// _________________________________________________________________________________*@

@model SIBI.Models.Mantenimiento

@{
    ViewBag.Title = "Editar";
}

<h2>Editar</h2>

<script src="@Url.Content("~/Scripts/myScript3.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/myScript4.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.ui.autocomplete.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/myScript7.js")" type="text/javascript"></script>
<script type="text/javascript">
    disableParDropList(['#BienInformaticoId']);
</script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <input id="ProveedorId" name="ProveedorId" value="@(ViewBag.ProveedorId)" type="text" style="visibility:hidden; height:0px" /><br />
    <fieldset>
        <legend>Mantenimiento</legend>

        @Html.HiddenFor(model => model.MantenimientoId)
    <br />
    <fieldset>
    <legend>Datos Básicos</legend>
        <br />
    <table width="100%">
        <tr>
            <td width="33%">
                <div class="editor-label">
                    Serial (*)
                </div>
                <div class="desabilitado">
                    @Html.DropDownList("BienInformaticoId", String.Empty)<br />
                    @Html.ValidationMessageFor(model => model.BienInformaticoId)
                </div>
            <td width ="33%">
                <div class="editor-label">
                    Fecha Inicio Mantenimiento (*)
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.dfim)
                    @Html.ValidationMessageFor(model => model.dfim)
                </div>
            </td>
            <td width ="33%">
                <div class="editor-label">
                    Fecha Final Mantenimiento
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.dffm)
                    @Html.ValidationMessageFor(model => model.dffm)
                    <div class="error">@ViewBag.Fail</div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="editor-label">
                    Proveedor (*)
                </div>
                <div class="editor-field">
                    @*<div id="DialogProveedorAsignacion" title="Proveedores"></div>
                    @Html.DropDownList("ProveedorId", String.Empty)<br /> *@
                    <input id="ProveedorId_Visible" type="text" value="@(ViewBag.ProveedorId_Visible)" name="ProveedorId_Visible" /><br /> 
                    @Html.ValidationMessageFor(model => model.ProveedorId)
                </div>
            </td>
            <td>
                <div class="editor-label">
                    Estado Reparación
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.cflg)
                    @Html.ValidationMessageFor(model => model.cflg)
                </div>
            </td>
        </tr>
    </table>
    </fieldset>
    <fieldset>
    <legend>Datos Informatívos</legend>
    <br />
                <div class="editor-label">
                    Observación
                </div>
                <div class="editor-field">
                    @Html.TextAreaFor(model => model.cobs)
                    @Html.ValidationMessageFor(model => model.cobs)
                </div>
    </fieldset>
        <p>
            <input type="submit" value="Salvar" />
        </p>
</fieldset>

}

<div>
    @Html.ActionLink("Menú Anterior", "SearchIndex")
</div>
